package come.my.test;

public class day19 {
    public static void main(String[] args) {
   //     System.out.println(new LongShape("red",2,3).getArea());

   //     Triangle triangle = new Triangle(3, 4, 5);
   //     System.out.println(triangle.getSum());
   //     Triangle triangle1 = new Triangle(1, 2, 3);
   //     System.out.println(triangle1.getSum());

   //     Car car = new Car();
   //     car.charge();


    }
}
/*abstract class Shape{
    private String color;
    public Shape(String color) {
        this.color = color;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }
    public abstract String getArea();
}
class LongShape extends Shape{
    private double length;
    private double width;

    public LongShape(String color, double length, double width) {
        super(color);
        this.length = length;
        this.width = width;
    }

    @Override
    public String getArea() {
        return "长为"+length+" "+"宽为"+" "+width+" "+"面积为"+" "+length * width;
    }
}*/
/*abstract class Shape{
    public abstract String getSum();
}
 class Triangle extends Shape{
    private double a;
    private double b;
    private double c;
    int index=0;

    public Triangle(double a, double b, double c) {
        this.a = a;
        this.b = b;
        this.c = c;
    }
   @Override
    public String getSum() {
        if(a+b>c&&a+c>b&&b+c>a)
            return "长为"+a+"宽为"+b+"高为"+c+"的三条边能构成三角形,这个三角形的周长为"+(a+b+c);
        else
            return "长为"+a+"宽为"+b+"高为"+c+"的三条边不能构成三角形,因为三角形的两边之和大于第三边";

    }
}*/

/*interface USBRechargeable{
    void charge();
}
interface TypeCRechargeable{
    void charge();
}
class Car implements USBRechargeable,TypeCRechargeable{
    @Override
    public void charge() {
        System.out.println("汽车上的USB接口和TypeC接口都能用于给机充电");
    }
}*/